package com.taxsystem.chengwenzhi.sscx;

import java.util.ArrayList;
import java.util.HashMap;

import android.app.ActionBar;
import android.app.Activity;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;

import com.main.taxsystem.R;

public class SehdcxActivity extends Activity {
	private static final String PATH = "/app/taxservice/taxtypevalidateinfo";
	private ArrayList<HashMap<String,String>> list = null;
	private SimpleAdapter adapter = null;
	private ListView listView = null;
	private TextView sbfsTextView = null;
	private TextView jkfsTextView = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_sehdcx);
		
		ActionBar bar = getActionBar();
        bar.setHomeButtonEnabled(true);
        bar.setIcon(R.drawable.actionbar_icon);
        bar.setDisplayHomeAsUpEnabled(true);
        bar.setBackgroundDrawable(new ColorDrawable(0xff34a4f7));
        
		list = new ArrayList<HashMap<String,String>>();
		
		adapter = new SimpleAdapter(SehdcxActivity.this, list, R.layout.activity_sehdcx_list_item, 
				new String[]{"gljg","sz","pm","jsyj","sl","hdjsje","zsfs","nsqx","sbqx","jsqx","sfdkdj","zssz"}, 
				new int[]{
				R.id.sehdcx_taxlist_gljg,
				R.id.sehdcx_taxlist_sz,
				R.id.sehdcx_taxlist_pm,
				R.id.sehdcx_taxlist_jsyj,
				R.id.sehdcx_taxlist_sl,
				R.id.sehdcx_taxlist_hdjsje,
				R.id.sehdcx_taxlist_zsfs,
				R.id.sehdcx_taxlist_nsqx,
				R.id.sehdcx_taxlist_sbqx,
				R.id.sehdcx_taxlist_jsqx,
				R.id.sehdcx_taxlist_sfdjdk,
				R.id.sehdcx_taxlist_zssz
		});
		
		listView = (ListView) this.findViewById(R.id.listView);
		sbfsTextView = (TextView)this.findViewById(R.id.sehd_textView_sbfs);
		jkfsTextView = (TextView)this.findViewById(R.id.sehd_textView_jkfs);
		listView.setAdapter(adapter);
		buildTestData();
	}
	
	private void buildTestData(){
		sbfsTextView.setText("网络申报(Internet)");
		jkfsTextView.setText("ETS缴款");
		
		HashMap<String,String> map = new HashMap<String,String>();
		map.put("gljg", "广州市天河区地方税务局税源管理七科");
		map.put("sz", "增值税");
		map.put("pm", "小规模纳税人-商业(含工业)(3%)");
		map.put("jsyj", "增值额");
		map.put("sl", "0.03");
		map.put("hdjsje", "0");
		map.put("zsfs", "查帐征收");
		map.put("nsqx", "月");
		map.put("sbqx", "税款所属时期后15天");
		map.put("jsqx", "税款所属时期后15天");
		map.put("sfdkdj", "1");
		map.put("zssz", "");
		list.add(map);
		
		map = new HashMap<String,String>();
		map.put("gljg", "广州市天河区地方税务局税源管理七科");
		map.put("sz", "营业税");
		map.put("pm", "其他服务业");
		map.put("jsyj", "营业额");
		map.put("sl", "0.05");
		map.put("hdjsje", "0");
		map.put("zsfs", "查帐征收");
		map.put("nsqx", "月");
		map.put("sbqx", "税款所属时期后15天");
		map.put("jsqx", "税款所属时期后15天");
		map.put("sfdkdj", "1");
		map.put("zssz", "");
		list.add(map);
		
		map = new HashMap<String,String>();
		map.put("gljg", "广州市天河区地方税务局税源管理七科");
		map.put("sz", "城市维护建设税");
		map.put("pm", "所在地为市区的城建税");
		map.put("jsyj", "增值税、消费税和营业税实缴税额");
		map.put("sl", "0.07");
		map.put("hdjsje", "0");
		map.put("zsfs", "查帐征收");
		map.put("nsqx", "月");
		map.put("sbqx", "税款所属时期后15天");
		map.put("jsqx", "税款所属时期后15天");
		map.put("sfdkdj", "1");
		map.put("zssz", "增值税");
		list.add(map);
	}

}
